<?php

namespace app\admin\behavior;

use app\api\controller\Coupon;
use app\api\controller\Task;
use app\api\model\UserCoupon;

class AdminLog
{
    public function run(&$response)
    {
        //只记录POST请求的日志
        if (request()->isPost() && config('fastadmin.auto_record_log')) {
            \app\admin\model\AdminLog::record();
        }

        $coupon = new UserCoupon();
        $coupon->expireCoupon();

        $task = new Task();
        $task->task();

    }
}
